package cn.bearspark.happening.provider.dao.key;

import cn.bearspark.framework.redis.starter.key.RedisKeyBuilder;
import cn.bearspark.framework.redis.starter.buffer.hash.un.RedisHashBufferKeyBuilder;
import org.springframework.stereotype.Component;

/**
 * 动态的预约直播模块中 redis 缓存键的构造器
 *
 * @author f
 */
@Component
public class BookLiveBufferKeyBuilder extends RedisKeyBuilder implements RedisHashBufferKeyBuilder {

    /**
     * 预约直播的数据 的缓存的键的前缀
     */
    private static final String BOOK_LIVE_INFO = "bookLiveInfo";

    @Override
    public String buildHashBufferKey(long id) {
        return super.getPrefix() + BOOK_LIVE_INFO + super.getSplitItem() + id;
    }

}
